#ifndef ResourceManager_h__
#define ResourceManager_h__

#include <d3d9.h>
#include <map>
typedef LPDIRECT3DTEXTURE9 Texture;
class DirectXMesh;

class ResourceManager
{
public:
    ResourceManager() : m_defaultTexture(NULL) {}
    void LoadTexture(const char* path, const char* name);
    void LoadMesh(const char* path, const char* name);
    void AddMesh(const char* name, DirectXMesh* mesh);
    void SetDefaultTexture(const char* ident);
    void FlushMeshes();
    void FlushTextures();
    void FlushTexture(const char* id);
    void FlushMesh(const char* id);
    Texture GetTexture(const char* ID);
    DirectXMesh* GetMesh(const char* ID);

private:
    Texture m_defaultTexture;
    std::map<std::string, Texture> m_textures;
    std::map<std::string,DirectXMesh*> m_meshes;

};
#endif // ResourceManager_h__
